<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: pepr3d::ModelExporter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpepr3d_1_1_model_exporter.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classpepr3d_1_1_model_exporter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pepr3d::ModelExporter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Exports <a class="el" href="classpepr3d_1_1_geometry.html" title="The whole geometry of a model that the user is painting.">Geometry</a> to separate files via Assimp, supports surface export and depth extrusions.  
 <a href="classpepr3d_1_1_model_exporter.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_model_exporter_8h_source.html">ModelExporter.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a90cdfb31200413255c75cc2af4c55952"><td class="memItemLeft" align="right" valign="top"><a id="a90cdfb31200413255c75cc2af4c55952"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ModelExporter</b> (const <a class="el" href="classpepr3d_1_1_geometry.html">Geometry</a> *geometry, <a class="el" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a> *progress)</td></tr>
<tr class="separator:a90cdfb31200413255c75cc2af4c55952"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fd1351a4fb5634b761f1693206e0a1d"><td class="memItemLeft" align="right" valign="top"><a id="a4fd1351a4fb5634b761f1693206e0a1d"></a>
std::map&lt; colorIndex, std::unique_ptr&lt; aiScene &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a4fd1351a4fb5634b761f1693206e0a1d">createScenes</a> (ExportType exportType)</td></tr>
<tr class="memdesc:a4fd1351a4fb5634b761f1693206e0a1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a map where each color index has a corresponding exported Assimp scene. <br /></td></tr>
<tr class="separator:a4fd1351a4fb5634b761f1693206e0a1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0521b274720d0ad6beeaae466718fa45"><td class="memItemLeft" align="right" valign="top"><a id="a0521b274720d0ad6beeaae466718fa45"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a0521b274720d0ad6beeaae466718fa45">saveModel</a> (const std::string filePath, const std::string fileName, const std::string fileType, ExportType exportType)</td></tr>
<tr class="memdesc:a0521b274720d0ad6beeaae466718fa45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the exported <a class="el" href="classpepr3d_1_1_geometry.html" title="The whole geometry of a model that the user is painting.">Geometry</a> to files, may throw an exception on error. <br /></td></tr>
<tr class="separator:a0521b274720d0ad6beeaae466718fa45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a395f37149485a267944542b378546f6e"><td class="memItemLeft" align="right" valign="top"><a id="a395f37149485a267944542b378546f6e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a395f37149485a267944542b378546f6e">setExtrusionCoef</a> (std::vector&lt; float &gt; extrusionCoef)</td></tr>
<tr class="memdesc:a395f37149485a267944542b378546f6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets extrusion coefficients between 0 and 1 indexed by the color index. The vector has to be as long as the number of colors in the <a class="el" href="classpepr3d_1_1_color_manager.html" title="Represents a color palette, i.e., all colors and a selected active color.">ColorManager</a> of the current <a class="el" href="classpepr3d_1_1_geometry.html" title="The whole geometry of a model that the user is painting.">Geometry</a>. <br /></td></tr>
<tr class="separator:a395f37149485a267944542b378546f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a31cfba9f522ed35f2f25e1d88f5c0291"><td class="memItemLeft" align="right" valign="top"><a id="a31cfba9f522ed35f2f25e1d88f5c0291"></a>
std::map&lt; colorIndex, std::unique_ptr&lt; aiScene &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a31cfba9f522ed35f2f25e1d88f5c0291">createNonPolySurfaceScenes</a> ()</td></tr>
<tr class="memdesc:a31cfba9f522ed35f2f25e1d88f5c0291"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates surface only exported scenes without the need for a <a class="el" href="namespace_c_g_a_l.html" title="CGAL Serialization functions.">CGAL</a> Polyhedron. Returns a map where each color index has a corresponding exported Assimp scene. <br /></td></tr>
<tr class="separator:a31cfba9f522ed35f2f25e1d88f5c0291"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebf51f53d44f88e180a63900aedd386c"><td class="memItemLeft" align="right" valign="top"><a id="aebf51f53d44f88e180a63900aedd386c"></a>
std::map&lt; colorIndex, std::unique_ptr&lt; aiScene &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#aebf51f53d44f88e180a63900aedd386c">createPolySurfaceScenes</a> ()</td></tr>
<tr class="memdesc:aebf51f53d44f88e180a63900aedd386c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates surface only exported scenes with the need for a <a class="el" href="namespace_c_g_a_l.html" title="CGAL Serialization functions.">CGAL</a> Polyhedron. Returns a map where each color index has a corresponding exported Assimp scene. <br /></td></tr>
<tr class="separator:aebf51f53d44f88e180a63900aedd386c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf14c84e428fce47a5aefd330218e0c8"><td class="memItemLeft" align="right" valign="top"><a id="aaf14c84e428fce47a5aefd330218e0c8"></a>
std::map&lt; colorIndex, std::unique_ptr&lt; aiScene &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#aaf14c84e428fce47a5aefd330218e0c8">createNonPolyScenes</a> ()</td></tr>
<tr class="memdesc:aaf14c84e428fce47a5aefd330218e0c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates extruded scenes without the need for a <a class="el" href="namespace_c_g_a_l.html" title="CGAL Serialization functions.">CGAL</a> Polyhedron. Returns a map where each color index has a corresponding exported Assimp scene. <br /></td></tr>
<tr class="separator:aaf14c84e428fce47a5aefd330218e0c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a653be5616accde4e5dbb5c82bb260932"><td class="memItemLeft" align="right" valign="top"><a id="a653be5616accde4e5dbb5c82bb260932"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a653be5616accde4e5dbb5c82bb260932">normalizeSummedNormals</a> (std::map&lt; std::array&lt; float, 3 &gt;, glm::vec3 &gt; &amp;summedVertexNormals)</td></tr>
<tr class="memdesc:a653be5616accde4e5dbb5c82bb260932"><td class="mdescLeft">&#160;</td><td class="mdescRight">Normalize summed vertex normals. <br /></td></tr>
<tr class="separator:a653be5616accde4e5dbb5c82bb260932"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab278eb54afeced3be63e4e5eccdf3802"><td class="memItemLeft" align="right" valign="top"><a id="ab278eb54afeced3be63e4e5eccdf3802"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#ab278eb54afeced3be63e4e5eccdf3802">computeBoundaryEdges</a> (std::map&lt; std::array&lt; std::array&lt; float, 3 &gt;, 2 &gt;, <a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a> &gt; &amp;edgeLookup)</td></tr>
<tr class="memdesc:ab278eb54afeced3be63e4e5eccdf3802"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decide if the edge is between two colors. <br /></td></tr>
<tr class="separator:ab278eb54afeced3be63e4e5eccdf3802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ae56b6392c9db26a14ddd7a365a40fc"><td class="memItemLeft" align="right" valign="top"><a id="a0ae56b6392c9db26a14ddd7a365a40fc"></a>
std::vector&lt; <a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a0ae56b6392c9db26a14ddd7a365a40fc">selectBoundaryEdgesByColor</a> (std::map&lt; std::array&lt; std::array&lt; float, 3 &gt;, 2 &gt;, <a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a> &gt; &amp;edgeLookup, colorIndex color)</td></tr>
<tr class="memdesc:a0ae56b6392c9db26a14ddd7a365a40fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a vector of <a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a> that were boundary and with the specified color. <br /></td></tr>
<tr class="separator:a0ae56b6392c9db26a14ddd7a365a40fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e9c64e2f9dd0482f3216ff9cfd016f3"><td class="memItemLeft" align="right" valign="top"><a id="a1e9c64e2f9dd0482f3216ff9cfd016f3"></a>
std::map&lt; colorIndex, std::unique_ptr&lt; aiScene &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a1e9c64e2f9dd0482f3216ff9cfd016f3">createPolyScenes</a> (bool withSDF)</td></tr>
<tr class="memdesc:a1e9c64e2f9dd0482f3216ff9cfd016f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates extruded scenes with the need for a <a class="el" href="namespace_c_g_a_l.html" title="CGAL Serialization functions.">CGAL</a> Polyhedron. Optionally extrudes relative to SDF values. Returns a map where each color index has a corresponding exported Assimp scene. <br /></td></tr>
<tr class="separator:a1e9c64e2f9dd0482f3216ff9cfd016f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a007a46e5169890fa8ea5f87f2429e954"><td class="memItemLeft" align="right" valign="top"><a id="a007a46e5169890fa8ea5f87f2429e954"></a>
std::unique_ptr&lt; aiScene &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>createNewNonPolySurfaceScene</b> (std::vector&lt; unsigned int &gt; &amp;triangleIndices)</td></tr>
<tr class="separator:a007a46e5169890fa8ea5f87f2429e954"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33f988ccc16525698739ef2a84a4e215"><td class="memItemLeft" align="right" valign="top"><a id="a33f988ccc16525698739ef2a84a4e215"></a>
std::unique_ptr&lt; aiScene &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>createNewPolySurfaceScene</b> (std::vector&lt; <a class="el" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> &gt; &amp;triangleIndices)</td></tr>
<tr class="separator:a33f988ccc16525698739ef2a84a4e215"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17c20f94f6f130c249b6ab8aa7d36ea6"><td class="memItemLeft" align="right" valign="top"><a id="a17c20f94f6f130c249b6ab8aa7d36ea6"></a>
std::unique_ptr&lt; aiScene &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>createNewNonPolyScene</b> (std::vector&lt; unsigned int &gt; &amp;triangleIndices, std::map&lt; std::array&lt; float, 3 &gt;, glm::vec3 &gt; &amp;vertexNormalLookup, std::vector&lt; <a class="el" href="structpepr3d_1_1_model_exporter_1_1_indexed_edge.html">IndexedEdge</a> &gt; &amp;borderEdges, float userCoef)</td></tr>
<tr class="separator:a17c20f94f6f130c249b6ab8aa7d36ea6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad79e95cf891b25f4b8b2e21451a3f321"><td class="memItemLeft" align="right" valign="top"><a id="ad79e95cf891b25f4b8b2e21451a3f321"></a>
std::unique_ptr&lt; aiScene &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>createNewPolyScene</b> (std::vector&lt; <a class="el" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> &gt; &amp;triangleIndices, std::unordered_map&lt; PolyhedronData::vertex_descriptor, glm::vec3 &gt; &amp;vertexNormals, std::set&lt; PolyhedronData::halfedge_descriptor &gt; &amp;borderEdges, std::map&lt; PolyhedronData::vertex_descriptor, float &gt; &amp;vertexSDF, float userCoef)</td></tr>
<tr class="separator:ad79e95cf891b25f4b8b2e21451a3f321"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a0ac9e0564adb8d2a8d3283b19aa033de"><td class="memItemLeft" align="right" valign="top"><a id="a0ac9e0564adb8d2a8d3283b19aa033de"></a>
static aiVector3D&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_exporter.html#a0ac9e0564adb8d2a8d3283b19aa033de">calculateNormal</a> (const std::array&lt; glm::vec3, 3 &gt; vertices)</td></tr>
<tr class="memdesc:a0ac9e0564adb8d2a8d3283b19aa033de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a normal vector of a triangle. <br /></td></tr>
<tr class="separator:a0ac9e0564adb8d2a8d3283b19aa033de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a76a48fd072cfd132b2d9130d915d5fc7"><td class="memItemLeft" align="right" valign="top"><a id="a76a48fd072cfd132b2d9130d915d5fc7"></a>
const <a class="el" href="classpepr3d_1_1_geometry.html">Geometry</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mGeometry</b></td></tr>
<tr class="separator:a76a48fd072cfd132b2d9130d915d5fc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a618a0accacf4026df647364d4843049f"><td class="memItemLeft" align="right" valign="top"><a id="a618a0accacf4026df647364d4843049f"></a>
<a class="el" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mProgress</b></td></tr>
<tr class="separator:a618a0accacf4026df647364d4843049f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a795c2ac3c88bd58f8d3972b7e5a17dc5"><td class="memItemLeft" align="right" valign="top"><a id="a795c2ac3c88bd58f8d3972b7e5a17dc5"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mExtrusionCoef</b></td></tr>
<tr class="separator:a795c2ac3c88bd58f8d3972b7e5a17dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Exports <a class="el" href="classpepr3d_1_1_geometry.html" title="The whole geometry of a model that the user is painting.">Geometry</a> to separate files via Assimp, supports surface export and depth extrusions. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/<a class="el" href="_model_exporter_8h_source.html">ModelExporter.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacepepr3d.html">pepr3d</a></li><li class="navelem"><a class="el" href="classpepr3d_1_1_model_exporter.html">ModelExporter</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
